package com.yzj.Bean;

public class Cake {
    String id;

    String name;

    String rich; //尺寸
    double price;
    String details;
    String pic ="https://img01.hua.com/uploadpic/newpic/5302071.jpg_220x240.jpg"; // 图片地址 放置网络地址

    public Cake() {
    }

    public Cake(String id, String name, String rich, double price, String details, String pic) {
        this.id = id;
        this.name = name;
        this.rich = rich;
        this.price = price;
        this.details = details;
        this.pic = pic;
    }

    @Override
    public String toString() {
        return "Cake{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", rich='" + rich + '\'' +
                ", price=" + price +
                ", details='" + details + '\'' +
                ", pic='" + pic + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRich() {
        return rich;
    }

    public void setRich(String rich) {
        this.rich = rich;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {

        if (pic != null && !"".equals(pic)) {
            this.pic = pic;
        }
    }
}
